Skip to content

Update TagListGenerator to always useReadOnlySpan<byte> properties#8486

Merged
andrewlock merged 2 commits intomasterfrom
andrew/update-tag-generator
Apr 24, 2026
Merged

Update TagListGenerator to always useReadOnlySpan<byte> properties#8486
andrewlock merged 2 commits intomasterfrom
andrew/update-tag-generator

Conversation

@andrewlock
Copy link
Copy Markdown
Member

Summary of changes

Update the tag list generator to always use ReadOnlySpan<byte> properties instead of byte[]

Reason for change

After moving our vendored Span<T> implementation into the System namespace, various optimizations open up to us, including using ReadOnlySpan<byte> properties on .NET Framework instead of static readonly byte[] to avoid startup costs.

Implementation details

Replace the code generated by the generator, and update the generated code

Test coverage

Covered by snapshot tests and behaviour is covered by existing tests. We'll check the benchmarks to make sure that we don't see any perf impact (there shouldn't be, impact should just be reduced startup costs)

Other details

Depends on a stack updating our vendored system code

@andrewlock andrewlock added type:refactor type:performance Performance, speed, latency, resource usage (CPU, memory) labels Apr 20, 2026
@andrewlock andrewlock marked this pull request as ready for review April 20, 2026 15:53
@andrewlock andrewlock requested review from a team as code owners April 20, 2026 15:53
@andrewlock andrewlock force-pushed the andrew/use-new-span-t branch from 25f6d5e to b1f8279 Compare April 21, 2026 10:19
@andrewlock andrewlock requested review from a team as code owners April 21, 2026 10:19
@andrewlock andrewlock force-pushed the andrew/update-tag-generator branch from eca7df4 to 54730c9 Compare April 21, 2026 10:19
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Apr 21, 2026

Benchmarks

Benchmark execution time: 2026-04-24 17:08:43

Comparing candidate commit 40b0f3c in PR branch andrew/update-tag-generator with baseline commit 0068997 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 27 metrics, 0 unstable metrics, 60 known flaky benchmarks, 27 flaky benchmarks without significant changes.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

Known flaky benchmarks

These benchmarks are marked as flaky and will not trigger a failure. Modify FLAKY_BENCHMARKS_REGEX to control which benchmarks are marked as flaky.

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net472

  • 🟥 throughput [-5549.473op/s; -5167.328op/s] or [-6.580%; -6.127%]

scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild net6.0

  • 🟩 throughput [+7232.511op/s; +10551.332op/s] or [+6.079%; +8.869%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • 🟥 execution_time [+318.671ms; +321.998ms] or [+158.136%; +159.787%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • 🟥 execution_time [+379.963ms; +382.107ms] or [+300.194%; +301.888%]

scenario:Benchmarks.Trace.AgentWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • 🟥 execution_time [+397.565ms; +400.484ms] or [+351.830%; +354.413%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net472

  • 🟥 allocated_mem [+1.308KB; +1.308KB] or [+27.529%; +27.541%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody net6.0

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+9.977%; +9.987%]
  • 🟩 execution_time [-15.455ms; -11.279ms] or [-7.218%; -5.267%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleMoreComplexBody netcoreapp3.1

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+27.502%; +27.510%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net472

  • 🟥 allocated_mem [+1.307KB; +1.307KB] or [+105.746%; +105.759%]
  • 🟥 throughput [-260710.301op/s; -257740.998op/s] or [-26.620%; -26.317%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody net6.0

  • 🟥 allocated_mem [+471 bytes; +472 bytes] or [+38.558%; +38.566%]
  • 🟩 execution_time [-26.448ms; -21.574ms] or [-11.795%; -9.621%]
  • 🟥 throughput [-69600.065op/s; -47179.414op/s] or [-7.435%; -5.040%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.AllCycleSimpleBody netcoreapp3.1

  • 🟥 allocated_mem [+1.272KB; +1.272KB] or [+105.292%; +105.304%]
  • 🟥 throughput [-138023.171op/s; -122016.721op/s] or [-19.831%; -17.531%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net6.0

  • 🟩 throughput [+8348.363op/s; +11291.004op/s] or [+5.312%; +7.184%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody netcoreapp3.1

  • 🟩 throughput [+7358.054op/s; +9993.505op/s] or [+5.862%; +7.961%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net6.0

  • 🟩 throughput [+358666.217op/s; +372496.319op/s] or [+11.959%; +12.421%]

scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody netcoreapp3.1

  • 🟩 execution_time [-19.099ms; -14.707ms] or [-8.804%; -6.780%]
  • 🟩 throughput [+132615.123op/s; +189050.638op/s] or [+5.264%; +7.504%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net472

  • 🟥 execution_time [+299.989ms; +300.576ms] or [+149.894%; +150.188%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs net6.0

  • 🟥 execution_time [+300.679ms; +303.977ms] or [+151.633%; +153.296%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeArgs netcoreapp3.1

  • 🟥 execution_time [+299.579ms; +302.233ms] or [+150.905%; +152.242%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net472

  • 🟥 execution_time [+298.852ms; +299.739ms] or [+146.784%; +147.220%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs net6.0

  • 🟥 execution_time [+296.058ms; +298.212ms] or [+144.732%; +145.785%]

scenario:Benchmarks.Trace.Asm.AppSecEncoderBenchmark.EncodeLegacyArgs netcoreapp3.1

  • 🟥 execution_time [+301.954ms; +303.606ms] or [+150.916%; +151.742%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net6.0

  • 🟥 execution_time [+25.176µs; +52.036µs] or [+5.774%; +11.934%]
  • 🟥 throughput [-252.520op/s; -131.728op/s] or [-10.979%; -5.727%]

scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net6.0

  • 🟥 execution_time [+24.303µs; +47.977µs] or [+7.759%; +15.316%]
  • 🟥 throughput [-444.105op/s; -244.974op/s] or [-13.844%; -7.637%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net472

  • 🟥 execution_time [+299.842ms; +300.528ms] or [+149.652%; +149.995%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest net6.0

  • unstable execution_time [+347.350ms; +388.420ms] or [+377.410%; +422.034%]
  • 🟩 throughput [+960.521op/s; +1093.436op/s] or [+7.893%; +8.985%]

scenario:Benchmarks.Trace.AspNetCoreBenchmark.SendRequest netcoreapp3.1

  • unstable execution_time [+283.363ms; +322.362ms] or [+215.155%; +244.766%]
  • 🟩 throughput [+681.620op/s; +883.333op/s] or [+6.599%; +8.551%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net472

  • unstable execution_time [+436.976ms; +519.698ms] or [+200.917%; +238.952%]
  • 🟥 throughput [-571.055op/s; -514.758op/s] or [-51.743%; -46.642%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces net6.0

  • unstable execution_time [+201.614ms; +334.828ms] or [+85.919%; +142.689%]
  • 🟥 throughput [-742.335op/s; -658.930op/s] or [-49.514%; -43.951%]

scenario:Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces netcoreapp3.1

  • 🟥 execution_time [+351.308ms; +360.290ms] or [+210.123%; +215.495%]
  • 🟥 throughput [-416.220op/s; -380.236op/s] or [-28.981%; -26.475%]

scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net6.0

  • 🟩 execution_time [-152.448µs; -121.008µs] or [-7.722%; -6.130%]
  • 🟩 throughput [+34.400op/s; +42.832op/s] or [+6.791%; +8.455%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net472

  • 🟥 execution_time [+302.134ms; +303.646ms] or [+152.149%; +152.910%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch net6.0

  • 🟥 execution_time [+300.403ms; +303.004ms] or [+150.532%; +151.836%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch netcoreapp3.1

  • 🟥 execution_time [+299.808ms; +302.813ms] or [+150.611%; +152.120%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net472

  • 🟥 execution_time [+300.259ms; +302.007ms] or [+150.780%; +151.658%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync net6.0

  • 🟥 execution_time [+299.858ms; +301.963ms] or [+148.266%; +149.307%]

scenario:Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearchAsync netcoreapp3.1

  • 🟥 execution_time [+302.837ms; +306.733ms] or [+153.491%; +155.466%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net472

  • 🟥 execution_time [+301.727ms; +303.073ms] or [+151.440%; +152.115%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync net6.0

  • 🟥 execution_time [+300.581ms; +302.598ms] or [+149.812%; +150.818%]
  • 🟩 throughput [+29267.903op/s; +34270.139op/s] or [+5.812%; +6.805%]

scenario:Benchmarks.Trace.GraphQLBenchmark.ExecuteAsync netcoreapp3.1

  • 🟥 execution_time [+301.284ms; +304.167ms] or [+149.886%; +151.320%]

scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net6.0

  • 🟩 execution_time [-16.372ms; -11.971ms] or [-7.613%; -5.566%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net472

  • unstable execution_time [+5.938µs; +46.807µs] or [+1.467%; +11.562%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark net6.0

  • 🟩 allocated_mem [-20.028KB; -20.007KB] or [-7.306%; -7.298%]
  • unstable execution_time [-19.847µs; +49.702µs] or [-3.923%; +9.823%]
  • unstable throughput [-105.308op/s; +106.851op/s] or [-5.255%; +5.332%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark netcoreapp3.1

  • 🟩 allocated_mem [-18.456KB; -18.440KB] or [-6.728%; -6.722%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net6.0

  • unstable execution_time [+7.200µs; +11.485µs] or [+17.018%; +27.147%]
  • 🟥 throughput [-5043.968op/s; -3246.962op/s] or [-21.234%; -13.669%]

scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark netcoreapp3.1

  • unstable execution_time [-13.717µs; -6.575µs] or [-21.281%; -10.201%]
  • 🟩 throughput [+1638.550op/s; +3112.232op/s] or [+10.053%; +19.095%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net472

  • 🟥 execution_time [+302.504ms; +303.712ms] or [+152.902%; +153.513%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+302.642ms; +304.976ms] or [+154.044%; +155.232%]

scenario:Benchmarks.Trace.Log4netBenchmark.EnrichedLog netcoreapp3.1

  • 🟥 execution_time [+300.883ms; +302.908ms] or [+150.629%; +151.643%]

scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net6.0

  • 🟩 throughput [+35486.962op/s; +39068.027op/s] or [+6.717%; +7.395%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net472

  • 🟥 execution_time [+299.864ms; +301.410ms] or [+149.455%; +150.226%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog net6.0

  • 🟥 execution_time [+300.681ms; +302.065ms] or [+150.988%; +151.683%]

scenario:Benchmarks.Trace.SerilogBenchmark.EnrichedLog netcoreapp3.1

  • 🟥 execution_time [+303.539ms; +306.102ms] or [+153.936%; +155.235%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net472

  • 🟥 execution_time [+299.997ms; +300.587ms] or [+149.640%; +149.935%]
  • 🟩 throughput [+61272920.444op/s; +61534156.812op/s] or [+44.623%; +44.813%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore net6.0

  • 🟥 execution_time [+423.986ms; +428.350ms] or [+527.302%; +532.729%]
  • 🟩 throughput [+992.540op/s; +1172.977op/s] or [+7.673%; +9.068%]

scenario:Benchmarks.Trace.SingleSpanAspNetCoreBenchmark.SingleSpanAspNetCore netcoreapp3.1

  • 🟥 execution_time [+299.113ms; +300.059ms] or [+149.191%; +149.662%]
  • 🟩 throughput [+18288822.428op/s; +19231809.156op/s] or [+8.101%; +8.518%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net6.0

  • 🟩 throughput [+77340.960op/s; +88263.995op/s] or [+7.221%; +8.241%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net6.0

  • 🟩 throughput [+87672.953op/s; +118260.779op/s] or [+6.786%; +9.154%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan netcoreapp3.1

  • 🟩 throughput [+70833.039op/s; +79166.402op/s] or [+7.035%; +7.862%]

scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net6.0

  • 🟩 throughput [+40496.331op/s; +47426.514op/s] or [+7.353%; +8.612%]

scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net6.0

  • 🟩 throughput [+69289.385op/s; +87230.820op/s] or [+7.741%; +9.746%]

Known flaky benchmarks without significant changes:

  • scenario:Benchmarks.Trace.ActivityBenchmark.StartStopWithChild netcoreapp3.1
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorMoreComplexBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecBodyBenchmark.ObjectExtractorSimpleBody net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmark netcoreapp3.1
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack net472
  • scenario:Benchmarks.Trace.Asm.AppSecWafBenchmark.RunWafRealisticBenchmarkWithAttack netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool net6.0
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OptimizedCharSliceWithPool netcoreapp3.1
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice net472
  • scenario:Benchmarks.Trace.CharSliceBenchmark.OriginalCharSlice netcoreapp3.1
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog net472
  • scenario:Benchmarks.Trace.ILoggerBenchmark.EnrichedLog netcoreapp3.1
  • scenario:Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive net472
  • scenario:Benchmarks.Trace.RedisBenchmark.SendReceive netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishScope netcoreapp3.1
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishSpan net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes net472
  • scenario:Benchmarks.Trace.SpanBenchmark.StartFinishTwoScopes netcoreapp3.1
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin net472
  • scenario:Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin netcoreapp3.1

Copy link
Copy Markdown
Collaborator

@bouwkast bouwkast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I mainly looked at the Source.cs and the tests and then just did a look at some of the generated files, assuming the others are the same

@andrewlock andrewlock force-pushed the andrew/use-new-span-t branch from b1f8279 to 9b090d5 Compare April 24, 2026 07:06
@andrewlock andrewlock force-pushed the andrew/update-tag-generator branch 3 times, most recently from 14245b2 to fa83d95 Compare April 24, 2026 08:26
@andrewlock andrewlock force-pushed the andrew/use-new-span-t branch from d54f3cf to d1485d3 Compare April 24, 2026 11:31
@andrewlock andrewlock force-pushed the andrew/update-tag-generator branch from fa83d95 to 787ab49 Compare April 24, 2026 11:31
@dd-trace-dotnet-ci-bot
Copy link
Copy Markdown

dd-trace-dotnet-ci-bot Bot commented Apr 24, 2026

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing This PR (8486) and master.

✅ No regressions detected - check the details below

Full Metrics Comparison

FakeDbCommand

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration74.71 ± (74.53 - 75.03) ms75.12 ± (75.04 - 75.60) ms+0.6%✅⬆️
.NET Framework 4.8 - Bailout
duration76.66 ± (76.57 - 76.94) ms77.41 ± (77.37 - 77.84) ms+1.0%✅⬆️
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1080.83 ± (1078.66 - 1085.45) ms1081.19 ± (1080.71 - 1088.11) ms+0.0%✅⬆️
.NET Core 3.1 - Baseline
process.internal_duration_ms22.66 ± (22.60 - 22.71) ms22.75 ± (22.67 - 22.82) ms+0.4%✅⬆️
process.time_to_main_ms86.42 ± (86.10 - 86.73) ms86.50 ± (86.13 - 86.86) ms+0.1%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.90 ± (10.89 - 10.90) MB10.92 ± (10.92 - 10.93) MB+0.2%✅⬆️
runtime.dotnet.threads.count12 ± (12 - 12)12 ± (12 - 12)+0.0%
.NET Core 3.1 - Bailout
process.internal_duration_ms22.43 ± (22.39 - 22.47) ms22.33 ± (22.28 - 22.37) ms-0.5%
process.time_to_main_ms86.31 ± (86.08 - 86.54) ms85.45 ± (85.24 - 85.65) ms-1.0%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.87 ± (10.87 - 10.88) MB10.96 ± (10.96 - 10.96) MB+0.8%✅⬆️
runtime.dotnet.threads.count13 ± (13 - 13)13 ± (13 - 13)+0.0%
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms212.34 ± (211.51 - 213.17) ms211.68 ± (210.79 - 212.57) ms-0.3%
process.time_to_main_ms533.40 ± (532.12 - 534.67) ms532.74 ± (531.37 - 534.10) ms-0.1%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed47.91 ± (47.88 - 47.94) MB48.02 ± (47.99 - 48.05) MB+0.2%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.0%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms21.30 ± (21.26 - 21.33) ms21.44 ± (21.38 - 21.51) ms+0.7%✅⬆️
process.time_to_main_ms73.74 ± (73.58 - 73.91) ms75.54 ± (75.20 - 75.87) ms+2.4%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.60 ± (10.59 - 10.60) MB10.63 ± (10.63 - 10.64) MB+0.4%✅⬆️
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 6 - Bailout
process.internal_duration_ms21.16 ± (21.12 - 21.21) ms21.05 ± (21.01 - 21.08) ms-0.6%
process.time_to_main_ms74.81 ± (74.62 - 75.00) ms74.37 ± (74.20 - 74.55) ms-0.6%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed10.70 ± (10.70 - 10.71) MB10.75 ± (10.75 - 10.75) MB+0.4%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms384.40 ± (382.53 - 386.26) ms382.11 ± (380.36 - 383.86) ms-0.6%
process.time_to_main_ms533.83 ± (532.54 - 535.12) ms531.45 ± (530.25 - 532.66) ms-0.4%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed49.21 ± (49.18 - 49.24) MB49.37 ± (49.35 - 49.39) MB+0.3%✅⬆️
runtime.dotnet.threads.count28 ± (28 - 28)28 ± (28 - 28)+0.3%✅⬆️
.NET 8 - Baseline
process.internal_duration_ms19.82 ± (19.76 - 19.88) ms19.68 ± (19.62 - 19.73) ms-0.7%
process.time_to_main_ms76.02 ± (75.71 - 76.34) ms74.29 ± (73.97 - 74.60) ms-2.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.67 ± (7.67 - 7.68) MB7.66 ± (7.66 - 7.67) MB-0.1%
runtime.dotnet.threads.count10 ± (10 - 10)10 ± (10 - 10)+0.0%
.NET 8 - Bailout
process.internal_duration_ms19.50 ± (19.45 - 19.54) ms19.83 ± (19.78 - 19.88) ms+1.7%✅⬆️
process.time_to_main_ms74.73 ± (74.51 - 74.94) ms77.17 ± (76.87 - 77.46) ms+3.3%✅⬆️
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed7.72 ± (7.71 - 7.72) MB7.72 ± (7.72 - 7.73) MB+0.1%✅⬆️
runtime.dotnet.threads.count11 ± (11 - 11)11 ± (11 - 11)+0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms300.07 ± (297.91 - 302.23) ms302.04 ± (299.62 - 304.47) ms+0.7%✅⬆️
process.time_to_main_ms492.50 ± (491.30 - 493.71) ms491.19 ± (490.06 - 492.31) ms-0.3%
runtime.dotnet.exceptions.count0 ± (0 - 0)0 ± (0 - 0)+0.0%
runtime.dotnet.mem.committed36.49 ± (36.46 - 36.52) MB36.49 ± (36.47 - 36.52) MB+0.0%✅⬆️
runtime.dotnet.threads.count27 ± (27 - 27)27 ± (27 - 27)-0.1%

HttpMessageHandler

Metric Master (Mean ± 95% CI) Current (Mean ± 95% CI) Change Status
.NET Framework 4.8 - Baseline
duration203.83 ± (203.91 - 205.34) ms202.19 ± (202.02 - 202.92) ms-0.8%
.NET Framework 4.8 - Bailout
duration207.27 ± (207.21 - 208.20) ms206.32 ± (205.89 - 206.87) ms-0.5%
.NET Framework 4.8 - CallTarget+Inlining+NGEN
duration1206.47 ± (1206.23 - 1213.28) ms1198.12 ± (1198.54 - 1206.63) ms-0.7%
.NET Core 3.1 - Baseline
process.internal_duration_ms197.11 ± (196.52 - 197.70) ms196.92 ± (196.29 - 197.55) ms-0.1%
process.time_to_main_ms85.63 ± (85.31 - 85.95) ms85.04 ± (84.73 - 85.34) ms-0.7%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.07 ± (16.05 - 16.08) MB15.94 ± (15.93 - 15.96) MB-0.8%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.3%✅⬆️
.NET Core 3.1 - Bailout
process.internal_duration_ms197.37 ± (196.82 - 197.92) ms196.22 ± (195.64 - 196.80) ms-0.6%
process.time_to_main_ms86.97 ± (86.70 - 87.23) ms86.38 ± (86.09 - 86.67) ms-0.7%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed16.08 ± (16.07 - 16.09) MB16.00 ± (15.99 - 16.02) MB-0.5%
runtime.dotnet.threads.count21 ± (21 - 21)21 ± (21 - 21)+1.4%✅⬆️
.NET Core 3.1 - CallTarget+Inlining+NGEN
process.internal_duration_ms390.27 ± (389.06 - 391.48) ms390.98 ± (389.61 - 392.35) ms+0.2%✅⬆️
process.time_to_main_ms538.38 ± (537.05 - 539.71) ms535.11 ± (533.65 - 536.57) ms-0.6%
runtime.dotnet.exceptions.count3 ± (3 - 3)3 ± (3 - 3)+0.0%
runtime.dotnet.mem.committed57.98 ± (57.83 - 58.13) MB58.03 ± (57.85 - 58.21) MB+0.1%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)+0.0%✅⬆️
.NET 6 - Baseline
process.internal_duration_ms205.08 ± (204.39 - 205.76) ms202.57 ± (201.90 - 203.24) ms-1.2%
process.time_to_main_ms75.42 ± (75.11 - 75.72) ms74.14 ± (73.88 - 74.40) ms-1.7%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.26 ± (16.24 - 16.28) MB16.24 ± (16.22 - 16.26) MB-0.1%
runtime.dotnet.threads.count19 ± (19 - 19)19 ± (19 - 19)-1.2%
.NET 6 - Bailout
process.internal_duration_ms204.43 ± (203.75 - 205.10) ms201.63 ± (201.04 - 202.21) ms-1.4%
process.time_to_main_ms76.31 ± (76.01 - 76.61) ms75.10 ± (74.82 - 75.39) ms-1.6%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed16.35 ± (16.33 - 16.36) MB16.28 ± (16.26 - 16.30) MB-0.4%
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)+0.1%✅⬆️
.NET 6 - CallTarget+Inlining+NGEN
process.internal_duration_ms594.19 ± (591.31 - 597.07) ms594.17 ± (591.50 - 596.85) ms-0.0%
process.time_to_main_ms541.87 ± (540.56 - 543.18) ms536.25 ± (534.82 - 537.69) ms-1.0%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed60.90 ± (60.80 - 61.00) MB60.95 ± (60.85 - 61.05) MB+0.1%✅⬆️
runtime.dotnet.threads.count31 ± (31 - 31)31 ± (31 - 31)-0.1%
.NET 8 - Baseline
process.internal_duration_ms201.59 ± (201.05 - 202.13) ms201.39 ± (200.71 - 202.07) ms-0.1%
process.time_to_main_ms74.55 ± (74.30 - 74.80) ms73.98 ± (73.70 - 74.27) ms-0.8%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.58 ± (11.57 - 11.60) MB11.64 ± (11.62 - 11.65) MB+0.5%✅⬆️
runtime.dotnet.threads.count18 ± (18 - 18)19 ± (19 - 19)+1.2%✅⬆️
.NET 8 - Bailout
process.internal_duration_ms202.31 ± (201.74 - 202.88) ms202.16 ± (201.48 - 202.84) ms-0.1%
process.time_to_main_ms76.12 ± (75.83 - 76.41) ms75.70 ± (75.40 - 76.00) ms-0.6%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed11.66 ± (11.64 - 11.67) MB11.72 ± (11.71 - 11.73) MB+0.5%✅⬆️
runtime.dotnet.threads.count20 ± (20 - 20)20 ± (20 - 20)-0.0%
.NET 8 - CallTarget+Inlining+NGEN
process.internal_duration_ms523.83 ± (518.76 - 528.90) ms517.22 ± (513.24 - 521.20) ms-1.3%
process.time_to_main_ms497.16 ± (496.02 - 498.30) ms494.23 ± (493.06 - 495.40) ms-0.6%
runtime.dotnet.exceptions.count4 ± (4 - 4)4 ± (4 - 4)+0.0%
runtime.dotnet.mem.committed50.29 ± (50.23 - 50.35) MB50.31 ± (50.27 - 50.35) MB+0.0%✅⬆️
runtime.dotnet.threads.count30 ± (30 - 30)30 ± (30 - 30)-0.6%
Comparison explanation

Execution-time benchmarks measure the whole time it takes to execute a program, and are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are highlighted in **red**. The following thresholds were used for comparing the execution times:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard.

Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph).

Duration charts
FakeDbCommand (.NET Framework 4.8)
gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8486) - mean (75ms)  : 71, 79
    master - mean (75ms)  : 71, 78

    section Bailout
    This PR (8486) - mean (78ms)  : 74, 81
    master - mean (77ms)  : 74, 79

    section CallTarget+Inlining+NGEN
    This PR (8486) - mean (1,084ms)  : 1032, 1137
    master - mean (1,082ms)  : 1034, 1130

Loading
FakeDbCommand (.NET Core 3.1)
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8486) - mean (116ms)  : 109, 124
    master - mean (116ms)  : 110, 122

    section Bailout
    This PR (8486) - mean (115ms)  : 111, 118
    master - mean (116ms)  : 113, 119

    section CallTarget+Inlining+NGEN
    This PR (8486) - mean (781ms)  : 752, 809
    master - mean (784ms)  : 754, 813

Loading
FakeDbCommand (.NET 6)
gantt
    title Execution time (ms) FakeDbCommand (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8486) - mean (104ms)  : 96, 111
    master - mean (101ms)  : 99, 104

    section Bailout
    This PR (8486) - mean (102ms)  : 99, 105
    master - mean (102ms)  : 100, 105

    section CallTarget+Inlining+NGEN
    This PR (8486) - mean (943ms)  : 904, 982
    master - mean (946ms)  : 912, 979

Loading
FakeDbCommand (.NET 8)
gantt
    title Execution time (ms) FakeDbCommand (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8486) - mean (102ms)  : 96, 108
    master - mean (104ms)  : 97, 111

    section Bailout
    This PR (8486) - mean (105ms)  : 100, 110
    master - mean (102ms)  : 98, 106

    section CallTarget+Inlining+NGEN
    This PR (8486) - mean (824ms)  : 787, 862
    master - mean (824ms)  : 790, 857

Loading
HttpMessageHandler (.NET Framework 4.8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8486) - mean (202ms)  : 196, 209
    master - mean (205ms)  : 194, 216

    section Bailout
    This PR (8486) - mean (206ms)  : 200, 213
    master - mean (208ms)  : 201, 215

    section CallTarget+Inlining+NGEN
    This PR (8486) - mean (1,203ms)  : 1143, 1262
    master - mean (1,210ms)  : 1159, 1261

Loading
HttpMessageHandler (.NET Core 3.1)
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8486) - mean (292ms)  : 278, 306
    master - mean (293ms)  : 278, 309

    section Bailout
    This PR (8486) - mean (293ms)  : 280, 305
    master - mean (295ms)  : 283, 306

    section CallTarget+Inlining+NGEN
    This PR (8486) - mean (963ms)  : 933, 993
    master - mean (965ms)  : 934, 996

Loading
HttpMessageHandler (.NET 6)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8486) - mean (287ms)  : 270, 304
    master - mean (291ms)  : 273, 308

    section Bailout
    This PR (8486) - mean (287ms)  : 272, 301
    master - mean (291ms)  : 276, 306

    section CallTarget+Inlining+NGEN
    This PR (8486) - mean (1,162ms)  : 1124, 1199
    master - mean (1,166ms)  : 1119, 1213

Loading
HttpMessageHandler (.NET 8)
gantt
    title Execution time (ms) HttpMessageHandler (.NET 8)
    dateFormat  x
    axisFormat %Q
    todayMarker off
    section Baseline
    This PR (8486) - mean (288ms)  : 271, 305
    master - mean (287ms)  : 276, 298

    section Bailout
    This PR (8486) - mean (289ms)  : 274, 304
    master - mean (289ms)  : 276, 302

    section CallTarget+Inlining+NGEN
    This PR (8486) - mean (1,046ms)  : 989, 1103
    master - mean (1,056ms)  : 978, 1134

Loading

Base automatically changed from andrew/use-new-span-t to master April 24, 2026 13:17
@andrewlock andrewlock force-pushed the andrew/update-tag-generator branch from 787ab49 to 40b0f3c Compare April 24, 2026 15:58
@andrewlock andrewlock enabled auto-merge (squash) April 24, 2026 15:58
@andrewlock andrewlock merged commit 57014aa into master Apr 24, 2026
138 checks passed
@andrewlock andrewlock deleted the andrew/update-tag-generator branch April 24, 2026 17:22
@github-actions github-actions Bot added this to the vNext-v3 milestone Apr 24, 2026
andrewlock added a commit that referenced this pull request Apr 27, 2026
… string literals (#8487)

## Summary of changes

Convert `Encoding.Utf8.GetBytes` calls to static constants using UTF8
string literals

## Reason for change

After moving our vendored `Span<T>` implementation into the `System`
namespace, various optimizations open up to us, including using UTF-8
string literals, to encode strings to UTF-8 at compile time instead of
at runtime. By combing with `static ReadOnlySpan<byte>` properties,
these also become zero allocation, so we get reduced overall memory
usage as well as better startup time

## Implementation details

Replace the following with utf8 string literals:
- `StringEncoding.UTF8.GetBytes`
- `Encoding.UTF8.GetBytes`
- `EncodingHelpers.UTF8NoBom.GetBytes`

## Test coverage

All covered by existing tests

## Other details

Depends on a stack updating our vendored system code

- #8391
- #8454
- #8455
- #8459
- #8461
- #8469
- #8476
- #8477
- #8486
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:performance Performance, speed, latency, resource usage (CPU, memory) type:refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants